home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / TURBOPASCAL WIN / PENWIN.PAK / README.PEN < prev    next >
Text File  |  1992-06-08  |  24KB  |  634 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. CONTENTS
  7. ___________________________________________________________________________
  8.  
  9.  
  10.  
  11.  
  12.  
  13. Introduction . . . . . . . . . . . 1     WM_HEDITCTL and HE_CHAROFFSET .  6
  14. Hardware requirements and basic          WM_SKB message  . . . . . . . .  6
  15. limitations  . . . . . . . . . . . 1     SKN_TERMINATED  . . . . . . . .  7
  16. Installation notes and                   REC_DEBUG . . . . . . . . . . .  7
  17. procedures . . . . . . . . . . . . 2     clErrorLevel  . . . . . . . . .  7
  18.   Installing the pen components--        Dictionary searches . . . . . .  8
  19.   minimum  . . . . . . . . . . . . 2     rc.RectBound  . . . . . . . . .  8
  20.     SYSTEM.INI changes . . . . . . 2     DRV_SetSamplingDist . . . . . .  8
  21.   Installing the pen components--        RecognizeData and ink . . . . .  8
  22.   complete . . . . . . . . . . . . 2     List of characters affected by
  23.     SYSTEM.INI changes . . . . . . 3     ALC_PUNC  . . . . . . . . . . .  9
  24.     PENWIN.INI changes . . . . . . 4     DLLs that use hedit and bedit
  25. Shipping PENWIN.DLL with your            controls  . . . . . . . . . . .  9
  26. application  . . . . . . . . . . . 4     Dictionary and recognizer ISVs:
  27. Release notes  . . . . . . . . . . 5     When Windows ends . . . . . . .  9
  28.   Hedits--delayed recogntion             SetAlcBitGesture,
  29.   mode . . . . . . . . . . . . . . 5     ResetAlcBitGesture, and
  30.   PostVirtualMouseEvent  . . . . . 6     IsAlcBitGesture removed . . . .  9
  31.   ALC_USEBITMAP  . . . . . . . . . 6     REC_ error values from Recognize
  32.   ProcessWriting . . . . . . . . . 6       . . . . . . . . . . . . . . .  9
  33.   Microsoft user dictionary DLL  . 6     DIRQ_SUGGEST not implemented  . 10
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                                      i
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. ===========================================================================
  65. Introduction
  66. ===========================================================================
  67.  
  68.                     Turbo Pascal for Windows contains the components from
  69.                     Windows for Pen Computing to let you build and test pen
  70.                     applications. A mouse can be used to get a rough idea
  71.                     of how recognition and a pen will work.
  72.  
  73.                     However, we strongly recommended that you use Windows
  74.                     for Pen Computing hardware (a pen, for example) during
  75.                     the design and development process. This is critical
  76.                     because a pen gives you an accurate feel for how an
  77.                     application will work in real situations and because
  78.                     the Microsoft Alphanumeric Recognition System (MARS)
  79.                     has been optimized for a pen and won't work as well
  80.                     with a mouse.
  81.  
  82.  
  83.  
  84. ===========================================================================
  85. Hardware requirements and basic limitations
  86. ===========================================================================
  87.  
  88.                     1. A driver for Microsoft-compatible mice has been
  89.                        provided so you can do simple testing of pen
  90.                        functionality. This pen driver is called
  91.                        MSMOUSE.DRV.
  92.  
  93.                     2. At this time, only VGA displays can be used with the
  94.                        pen extensions. The VGAP.DRV display driver is a
  95.                        modified version of the VGA.DRV that supports
  96.                        inking. It's required if you want to test pen
  97.                        functionalities.
  98.  
  99.                     3. Handwriting recognition with a mouse will be much
  100.                        less accurate than with digitizer hardware designed
  101.                        specifically for Pen Computing. The recognizer has
  102.                        been designed to work with pen computers and
  103.                        peripherals with true digitizer input and its
  104.                        associated high data rates and high data resolution.
  105.  
  106.                     4. The spell checking technology included in Windows
  107.                        for Pens must be used exclusively for the purpose of
  108.                        improving handwriting recognition. It is not to be
  109.                        used by applications as a spell checker or spelling
  110.                        corrector.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. ===========================================================================
  118. Installation notes and procedures
  119. ===========================================================================
  120.  
  121.  
  122.  
  123. Installing the pen  =======================================================
  124. components--minimum
  125.                     This procedure will result in a system that will let
  126.                     you build applications that contain hedit and bedit
  127.                     controls - and call any Windows for Pen Computing API
  128.                     functions. You will not be able to perform handwriting
  129.                     recognition or see ink on the screen.
  130.  
  131. ------------------  The following items must be added or changed in your
  132. SYSTEM.INI changes  SYSTEM.INI file so that the pen extensions will work.
  133. ------------------  Note: Back up your old SYSTEM.INI file before
  134.                     proceeding.
  135.  
  136.                     1. In the "[boot]" section:
  137.  
  138.                        a. Add "penwindows" to the list of drivers after the
  139.                           "drivers=" key. For example:
  140.  
  141.                           drivers=mmsystem.dll penwindows
  142.  
  143.                     2. In the "[Drivers]" section:
  144.  
  145.                        a. Add a new item "penwindows" and set it equal to
  146.                           the path to PENWIN.DLL. For example:
  147.  
  148.                           penwindows=C:\TPW\PEN\PENWIN.DLL
  149.  
  150.                     When Windows is restarted PENWIN.DLL will be loaded as
  151.                     an installed driver and you will be able to run
  152.                     applications containing bedit and hedit controls and
  153.                     call the Windows for Pen Computing functions in the
  154.                     PenWin unit.
  155.  
  156.  
  157. Installing the pen  =======================================================
  158. components--complete
  159.                     This procedure will result in a system that will run
  160.                     pen applications and allow you to experiment with
  161.                     handwriting recognition and inking functionalities in
  162.                     your applications. Once again, interaction with the
  163.                     mouse will prove inferior in every respect to
  164.                     interaction with a true pen device--but this system of
  165.  
  166.  
  167.  
  168.                                    - 2 -
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.                     using the special mouse driver will allow you to
  176.                     experiment and perform rudimentary testing of your pen
  177.                     functionalities.
  178.  
  179.  
  180. ------------------  The following items must be added or changed in your
  181. SYSTEM.INI changes  SYSTEM.INI file so that the pen extensions will work.
  182. ------------------  Note: Back up your old SYSTEM.INI file before
  183.                     proceeding.
  184.  
  185.                     1. In the "[boot]" section:
  186.  
  187.                        a. Change the "display.drv=" line so that the
  188.                           display driver is the pen capable VGAP.DRV
  189.                           shipped with Turbo Pascal for Windows. For
  190.                           example:
  191.  
  192.                              display.drv=C:\TPW\PEN\VGAP.DRV
  193.  
  194.                           Note: Only the VGA display device is supported by
  195.                           the pen components.
  196.  
  197.                        b. Add "pen penwindows" to the list of drivers after
  198.                           the "drivers=" key. For example:
  199.  
  200.                           drivers=mmsystem.dll pen penwindows
  201.  
  202.                        c. Change the "mouse.drv=" line so that it points to
  203.                           YESMOUSE.DRV. For example:
  204.  
  205.                           mouse.drv=C:\TPW\PEN\YESMOUSE.DRV
  206.  
  207.                     2. In the "[Drivers]" section:
  208.  
  209.                        a. Add a new item "pen" and set it equal to the path
  210.                           to MSMOUSE.DRV. For example:
  211.  
  212.                           pen=C:\TPW\PEN\MSMOUSE.DRV
  213.  
  214.                        b. Add a new item "penwindows" and set it equal to
  215.                           the path to PENWIN.DLL. For example:
  216.  
  217.                           penwindows=C:\TPW\PEN\PENWIN.DLL
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.                                    - 3 -
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233. ------------------  The PENWIN.INI file contains a number of initialization
  234. PENWIN.INI changes  settings for Windows for Pen Computing.
  235. ------------------
  236.                     There are also two explicit paths that must correctly
  237.                     identify the locations of MARS.DLL and MARS.MOB. To
  238.                     verify these paths, open PENWIN.INI with any generic
  239.                     text editor (like the TPW IDE) and make sure the path
  240.                     to MARS.DLL points to the current MARS.DLL location. Do
  241.                     the same for MARS.MOB.
  242.  
  243.                     Once the paths are correct, the file should be copied
  244.                     to the Windows 3.1 root - that is, the directory
  245.                     containing the Windows 3.1 WIN.COM.
  246.  
  247.  
  248.  
  249. ===========================================================================
  250. Shipping PENWIN.DLL with your application
  251. ===========================================================================
  252.  
  253.                     PENWIN.DLL is a fully redistributable component of
  254.                     Windows for Pen Computing. Because applications will
  255.                     seek to leverage the Pen API - hedit and bedit controls
  256.                     in particular - PENWIN.DLL can be shipped with your
  257.                     application. There are some considerations to keep in
  258.                     mind in shipping PENWIN.DLL with your application:
  259.  
  260.                     1. PENWIN.DLL functions ONLY under Windows 3.1. It WILL
  261.                        NOT WORK with Windows 3.0 because it functions only
  262.                        as an installable device driver - a feature not
  263.                        present in Windows 3.0.
  264.  
  265.                     2. As with other redistributable components such as
  266.                        COMMDLG.DLL and the OLE libraries, it is the
  267.                        responsibility of the application vendor to
  268.                        determine whether PENWIN.DLL has already been
  269.                        installed (there is a GetSystemMetrics call for
  270.                        this) and to ensure that the version of PENWIN.DLL
  271.                        with the latest version stamping is the one that is
  272.                        running. These issues are the same for all
  273.                        redistributable components, and further information
  274.                        is in the README file.
  275.  
  276.                     3. Unlike some of the other redistributable components,
  277.                        if your application installs PENWIN.DLL for the
  278.                        first time, or replaces the current version with a
  279.  
  280.  
  281.  
  282.  
  283.  
  284.                                    - 4 -
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.                        later one, Windows will have to be restarted. As an
  292.                        installable driver PENWIN.DLL can be loaded only at
  293.                        Windows boot time. Restarting Windows can be
  294.                        accomplished via an ExitWindows call or by simply
  295.                        prompting the user to do so.
  296.  
  297.                        Note: To install PENWIN.DLL on a Windows 3.1 system
  298.                        follow the "Minimum" procedure listed above.
  299.  
  300.                     4. PENWIN.DLL may be in either the \WINDOWS or the
  301.                        \WINDOWS\SYSTEM directory. The default will be
  302.                        \WINDOWS but since Windows for Pen Computing is an
  303.                        OEM product, you cannot control where PENWIN.DLL is
  304.                        located on a particular machine.
  305.  
  306.  
  307.  
  308. ===========================================================================
  309. Release notes
  310. ===========================================================================
  311.  
  312.                     Release Notes for the Microsoft(R) Windows for Pen
  313.                     Computing Programmer's Reference, version 1.00 (C)
  314.                     Copyright 1992 Microsoft Corporation.
  315.  
  316.                     This section contains release notes for version 1.00 of
  317.                     the Microsoft(R) Windows for Pen Computing Programmer's
  318.                     Reference. The information in this section is more
  319.                     current than the information in the manual. Where this
  320.                     file conflicts with printed documentation, you should
  321.                     assume that this file is correct.
  322.  
  323.                     Microsoft revises its documentation at the time of
  324.                     reprinting; the manuals and online help files may
  325.                     already include some of this information.
  326.  
  327.    Hedits--delayed  =======================================================
  328.    recogntion mode
  329.                     Setting focus in hedit causes any text in the control
  330.                     to appear even if the control is in "ink" mode. If this
  331.                     is undesireable the control should never be allowed to
  332.                     get the focus.
  333.  
  334.                     Sending an hedit the WM_HEDITCTL message with the
  335.                     HE_SETINKMODE parameter will clear the hedit's text
  336.                     buffer. The same message to a bedit will preserve the
  337.                     control's text contents.
  338.  
  339.  
  340.  
  341.  
  342.                                    - 5 -
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349. PostVirtualMouseEvent======================================================
  350.  
  351.                     Values greater than the maximum resolution in X
  352.                     direction (usually 640) and max resoultion Y direction
  353.                     (usually 480) will overflow.
  354.  
  355.      ALC_USEBITMAP  =======================================================
  356.  
  357.                     The Microsoft recognizer does not implement
  358.                     ALC_USEBITMAP in the alcPriority field for version 1.0.
  359.                     Note that alcPriority is implemented for the alc field.
  360.  
  361.     ProcessWriting  =======================================================
  362.  
  363.                     In the description of ProcessWriting, it says "The
  364.                     window specified by the hwnd parameter receives a
  365.                     WM_PARENTNOTIFY message when ProcessWriting destroys
  366.                     its inking window."
  367.  
  368.                     The window never gets the WM_PARENTNOTIFY message since
  369.                     it is not
  370.                     guaranteed that an inking window is created.
  371.  
  372.     Microsoft user  =======================================================
  373.     dictionary DLL
  374.                     The documentation incorrectly states that up to 16
  375.                     dictionaries can be loaded.
  376.  
  377.                     MSSPELL.DLL actually allows only six wordlists to be
  378.                     loaded. Consequently, version 1.00 of the Microsoft
  379.                     User Dictionary DLL allows only six wordlists to be
  380.                     loaded at a time.
  381.  
  382.    WM_HEDITCTL and  =======================================================
  383.      HE_CHAROFFSET
  384.                     Under the documentation for WM_HEDITCTL messages, under
  385.                     HE_CHAROFFSET, it says "See the related HE_CHAROFFSET."
  386.                     It should say "See the related HE_CHARPOSITION."
  387.  
  388.     WM_SKB message  =======================================================
  389.  
  390.                     When the state of the SKB changes, a WM_SKB message is
  391.                     posted. The documentation says that the LOWORD of the
  392.                     lParam contains information on what changed and that
  393.                     the HIWORD contains the window handle of the SKB.
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                    - 6 -
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.                     Actually, the LOWORD contains the hWnd and the HIWORD
  408.                     contains the information on what changed.
  409.  
  410.                     This should be corrected in two places: in the
  411.                     ShowKeyboard function and in the WM_SKB message
  412.                     documentation.
  413.  
  414.                     Also, one more value should be mentioned: the HIWORD of
  415.                     lParam contains SKN_TERMINATED (value $FFFF) if the
  416.                     keyboard has been closed.
  417.  
  418.     SKN_TERMINATED  =======================================================
  419.  
  420.                     WM_SKB sends SKN_TERMINATED in HIWORD(lParam) when
  421.                     terminating SKN_TERMINATED ($FFFF) is sent in the
  422.                     HIWORD(lParam) when the WM_SKB is sent to notify top-
  423.                     level windows that the On-Screen Keyboard is being
  424.                     terminated. This needs to be added to the documentation
  425.                     for the WM_SKB message and for the ShowKeyboard
  426.                     function.
  427.  
  428.          REC_DEBUG  =======================================================
  429.  
  430.                     In the Guide to Pen Programming, Chapter 11 "Pen
  431.                     Messages and
  432.                     Constants," under REC_ Values, under Debugging Values,
  433.                     it says:
  434.  
  435.                     "REC_DEBUG All debugging return values are less than
  436.                     this."
  437.  
  438.                     It should say:
  439.  
  440.                     "REC_DEBUG All debugging return values are less than or
  441.                     equal
  442.                     to this."
  443.  
  444.       clErrorLevel  =======================================================
  445.  
  446.                     The documentation for the RC field clErrorLevel says
  447.                     that this value can range from 0 to 100. In the
  448.                     PENWIN.PAS file, the minimum CL value is defined as
  449.  
  450.                      const
  451.                        cl_Minimum = 1;
  452.  
  453.                     The correct minimum for clErrorLevel is 1
  454.  
  455.  
  456.  
  457.  
  458.                                    - 7 -
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.         Dictionary  =======================================================
  466.           searches
  467.                     The documentation is somewhat confusing on the point of
  468.                     dictionary enumeration procedures in Chapter 7, page
  469.                     103. To expound:
  470.  
  471.                     If there are ten dictionaries in the dictionary path,
  472.                     and the ninth finds a match for a particular
  473.                     enumeration in a symbol graph, the remaining symbol
  474.                     graph elements will still be enumerated - checking for
  475.                     a match in a higher-order dictionary. In other words,
  476.                     the other eight dictionaries before the ninth
  477.                     dictionary in the list will get a shot at finding a
  478.                     "better" match. Enumeration of dictionaries therefore
  479.                     can be said to stop only when the symbol graph is
  480.                     exausted, or the first dictionary in the list responds
  481.                     affirmatively to a query.
  482.  
  483.  
  484.       rc.RectBound  =======================================================
  485.  
  486.                     Here is additional detail on the rectBound element of
  487.                     the RC structure.
  488.  
  489.                     rc.rectBound will be ignored if PCM_RECTBOUND is not
  490.                     set. The documentation suggests on page 237 that
  491.                     rc.lPcm = PCM_RECTBOUND only determines how the
  492.                     recognition context will end.
  493.  
  494. DRV_SetSamplingDist =======================================================
  495.  
  496.                     Page 226 of Chapter 10 - PENINFO structure:
  497.  
  498.                     In the notes after nSamplingRate and nSamplingDist, the
  499.                     driver messages that manipulate these fields are
  500.                     misnamed. In the printed documentation, they are named
  501.                     DRV_SetSamplingDist and DRV_SetSamplingRate; they are
  502.                     actually DRV_SetPenSamplingDist and
  503.                     DRV_SetPenSamplingRate.
  504.  
  505.  RecognizeData and  =======================================================
  506.                ink
  507.                     Calls to RecognizeData may return an rcresult that
  508.                     references pendata different than that used as a
  509.                     Parameter to the call. For example, Strokes may be
  510.                     removed and the rgbInk and nInkWidth fields of the
  511.                     PENDATAHEADER may not match the values in the original
  512.  
  513.  
  514.  
  515.  
  516.                                    - 8 -
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.                     pendata, as no inking has taken place during this
  524.                     recognition context.
  525.  
  526. List of characters  =======================================================
  527.        affected by
  528.           ALC_PUNC  On page 253 of the documentation, the list of chars in
  529.                     ALC_PUNC has two semicolons; one of these should be a
  530.                     colon.
  531.  
  532.      DLLs that use  =======================================================
  533.    hedit and bedit
  534.           controls  Any DLL that creates an hedit or bedit control must
  535.                     have a nonzero heap size. This is because those
  536.                     controls allocate buffers out of this heap.
  537.  
  538.     Dictionary and  =======================================================
  539.   recognizer ISVs:
  540.  When Windows ends  When a Windows session is about to end, PENWIN.DLL
  541.                     takes the following actions:
  542.  
  543.                     o Calls all the dictionaries in the global recognition
  544.                       context with a DIRQ_CLEANUP message and then frees
  545.                       the corresponding DLLs.
  546.  
  547.                     o Calls the CloseRecognizer function for the current
  548.                       recognizer and frees the corresponding DLL.
  549.  
  550.                     Dictionaries and recognizers can take the appropriate
  551.                     cleanup action at this time. The limitations on things
  552.                     that can be done are the same as those when an
  553.                     application receives a WM_ENDSESSION message.
  554.  
  555.  SetAlcBitGesture,  =======================================================
  556. ResetAlcBitGesture,
  557.                and  The Windows for Pen Computing Programmer's Reference
  558.    IsAlcBitGesture  refers to the above macros. They have been removed
  559.            removed  because the ability to set alc bits for gestures was
  560.                     not implemented.
  561.  
  562.  REC_ error values  =======================================================
  563.    from Recognize
  564.                     In the documentation for Recognize API and REC_ values
  565.                     in Chapter 11, there is a Debugging values section.
  566.                     There is a sentence that reads: "All of the values
  567.                     listed in the following table are in debug version
  568.                     only." That sentence should be replaced with the
  569.                     following: "All of the values below are providing for
  570.                     debugging information. A well-behaved application
  571.  
  572.  
  573.  
  574.                                    - 9 -
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.                     should not specify an RC that causes any of these
  582.                     values to be returned."
  583.  
  584.   DIRQ_SUGGEST not  =======================================================
  585.        implemented
  586.                     In version 1.0 of Windows for Pens, the dictionary
  587.                     shipped with the system does not support DIRQ_SUGGEST.
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.                                   - 10 -
  633.  
  634.